<!--
 * @Date: 2023-03-21 15:54:12
 * @LastEditTime: 2023-09-22 13:48:03
 * @FilePath: /wkw/src/tabbar/me/components/linkCells.vue
 * 介绍:我的
-->
<script lang="ts" setup>
import { toast } from "@@/hooks/vantHooks";
const { t } = useI18n();
const router = useRouter();

function todo() {
  toast.text(t("jing-qing-qi-dai"));
}
const linkList = computed(() => [
  [
    {
      leftIcon: "icon-caiwujilu",
      title: t("zi-jing-guan-li"),
      message: "",
      on: {
        click() {
          router.push({ name: "capitalControl" });
        },
      },
    },
    {
      leftIcon: "icon-coin",
      title: t("bao-jia-ji-jing"),
      message: "",
      on: {
        click() {
          router.push({ name: "fund" });
        },
      },
    },
  ],
  [
    {
      leftIcon: "icon-shezhi",
      title: t("she-qu-zhi-li"),
      message: "",
      on: {
        click() {
          router.push({ name: "communityGovern" });
        },
      },
    },
    {
      leftIcon: "icon-fenxiang",
      title: t("fen-xiang-yao-qing"),
      message: "",
      on: {
        click() {
          router.push({ name: "invite" });
        },
      },
    },
    {
      leftIcon: "icon-paihang",
      title: t("pai-hang-bang"),
      message: "",
      on: {
        click() {
          router.push({ name: "rankingList" });
        },
      },
    },
  ],
  [
    {
      leftIcon: "icon-guanyuwomen",
      title: t("guan-yu-wo-men"),
      message: "",
      on: {
        click() {
          router.push({ name: "me-aboutUs" });
        },
      },
    },
  ],
]);
</script>

<template>
  <div class="linkCells MT-lg">
    <Ccard v-for="card in linkList" class="MT-sm PT-0 PB-0" border-style="none">
      <Ccell
        v-for="cell in card"
        :key="cell.title"
        show-right-icon
        active
        v-on="cell.on || {}"
        :border-mode="cell === card.at(-1) ? 'none' : 'bottom'"
      >
        <Cicon color="var(--C-M1)" :name="cell.leftIcon" />
        <div>{{ cell.title }}</div>
      </Ccell>
    </Ccard>
  </div>
</template>

<style lang="scss" scoped></style>
